<%= form_with(model: article, local: true) do |form| %>
  <% if article.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(article.errors.count, "error") %> prohibited this article from being saved:</h2>

      <ul>
      <% article.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= form.label :title %>
    <%= form.text_field :title, id: :article_title %>
  </div>

  <div class="field">
    <%= form.label :content %>
    <%= form.text_area :content, id: :article_content %>
  </div>

  <div class="field">
    <%= form.label :status %>
    <%= form.number_field :status, id: :article_status %>
  </div>

  <div class="actions">
    <%= form.submit %>
  </div>
<% end %>
